
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge" />
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Django 1.7.2 release notes &#8212; Django 2.2.12.dev20200304094918 documentation</title>
    <link rel="stylesheet" href="../_static/default.css" type="text/css" />
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
    <script type="text/javascript" src="../_static/jquery.js"></script>
    <script type="text/javascript" src="../_static/underscore.js"></script>
    <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/language_data.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
    <link rel="next" title="Django 1.7.1 release notes" href="1.7.1.html" />
    <link rel="prev" title="Django 1.7.3 release notes" href="1.7.3.html" />



 
<script type="text/javascript" src="../templatebuiltins.js"></script>
<script type="text/javascript">
(function($) {
    if (!django_template_builtins) {
       // templatebuiltins.js missing, do nothing.
       return;
    }
    $(document).ready(function() {
        // Hyperlink Django template tags and filters
        var base = "../ref/templates/builtins.html";
        if (base == "#") {
            // Special case for builtins.html itself
            base = "";
        }
        // Tags are keywords, class '.k'
        $("div.highlight\\-html\\+django span.k").each(function(i, elem) {
             var tagname = $(elem).text();
             if ($.inArray(tagname, django_template_builtins.ttags) != -1) {
                 var fragment = tagname.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + tagname + "</a>");
             }
        });
        // Filters are functions, class '.nf'
        $("div.highlight\\-html\\+django span.nf").each(function(i, elem) {
             var filtername = $(elem).text();
             if ($.inArray(filtername, django_template_builtins.tfilters) != -1) {
                 var fragment = filtername.replace(/_/, '-');
                 $(elem).html("<a href='" + base + "#" + fragment + "'>" + filtername + "</a>");
             }
        });
    });
})(jQuery);</script>

  </head><body>

    <div class="document">
  <div id="custom-doc" class="yui-t6">
    <div id="hd">
      <h1><a href="../index.html">Django 2.2.12.dev20200304094918 documentation</a></h1>
      <div id="global-nav">
        <a title="Home page" href="../index.html">Home</a>  |
        <a title="Table of contents" href="../contents.html">Table of contents</a>  |
        <a title="Global index" href="../genindex.html">Index</a>  |
        <a title="Module index" href="../py-modindex.html">Modules</a>
      </div>
      <div class="nav">
    &laquo; <a href="1.7.3.html" title="Django 1.7.3 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="1.7.1.html" title="Django 1.7.1 release notes">next</a> &raquo;</div>
    </div>

    <div id="bd">
      <div id="yui-main">
        <div class="yui-b">
          <div class="yui-g" id="releases-1.7.2">
            
  <div class="section" id="s-django-1-7-2-release-notes">
<span id="django-1-7-2-release-notes"></span><h1>Django 1.7.2 release notes<a class="headerlink" href="#django-1-7-2-release-notes" title="Permalink to this headline">¶</a></h1>
<p><em>January 2, 2015</em></p>
<p>Django 1.7.2 fixes several bugs in 1.7.1.</p>
<p>Additionally, Django’s vendored version of six, <code class="docutils literal notranslate"><span class="pre">django.utils.six</span></code>, has
been upgraded to the latest release (1.9.0).</p>
<div class="section" id="s-bugfixes">
<span id="bugfixes"></span><h2>Bugfixes<a class="headerlink" href="#bugfixes" title="Permalink to this headline">¶</a></h2>
<ul class="simple">
<li>Fixed migration’s renaming of auto-created many-to-many tables when changing
<a class="reference internal" href="../ref/models/options.html#django.db.models.Options.db_table" title="django.db.models.Options.db_table"><code class="xref py py-attr docutils literal notranslate"><span class="pre">Meta.db_table</span></code></a> (<a class="reference external" href="https://code.djangoproject.com/ticket/23630">#23630</a>).</li>
<li>Fixed a migration crash when adding an explicit <code class="docutils literal notranslate"><span class="pre">id</span></code> field to a model on
SQLite (<a class="reference external" href="https://code.djangoproject.com/ticket/23702">#23702</a>).</li>
<li>Added a warning for duplicate models when a module is reloaded. Previously a
<code class="docutils literal notranslate"><span class="pre">RuntimeError</span></code> was raised every time two models clashed in the app registry.
(<a class="reference external" href="https://code.djangoproject.com/ticket/23621">#23621</a>).</li>
<li>Prevented <a class="reference internal" href="../ref/django-admin.html#django-admin-flush"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">flush</span></code></a> from loading initial data for migrated apps
(<a class="reference external" href="https://code.djangoproject.com/ticket/23699">#23699</a>).</li>
<li>Fixed a <a class="reference internal" href="../ref/django-admin.html#django-admin-makemessages"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">makemessages</span></code></a> regression in 1.7.1 when
<a class="reference internal" href="../ref/settings.html#std:setting-STATIC_ROOT"><code class="xref std std-setting docutils literal notranslate"><span class="pre">STATIC_ROOT</span></code></a> has the default <code class="docutils literal notranslate"><span class="pre">None</span></code> value (<a class="reference external" href="https://code.djangoproject.com/ticket/23717">#23717</a>).</li>
<li>Added GeoDjango compatibility with mysqlclient database driver.</li>
<li>Fixed MySQL 5.6+ crash with <code class="docutils literal notranslate"><span class="pre">GeometryField</span></code>s in migrations
(<a class="reference external" href="https://code.djangoproject.com/ticket/23719">#23719</a>).</li>
<li>Fixed a migration crash when removing a field that is referenced in
<code class="docutils literal notranslate"><span class="pre">AlterIndexTogether</span></code> or <code class="docutils literal notranslate"><span class="pre">AlterUniqueTogether</span></code> (<a class="reference external" href="https://code.djangoproject.com/ticket/23614">#23614</a>).</li>
<li>Updated the first day of the week in the Ukrainian locale to Monday.</li>
<li>Added support for transactional spatial metadata initialization on
SpatiaLite 4.1+ (<a class="reference external" href="https://code.djangoproject.com/ticket/23152">#23152</a>).</li>
<li>Fixed a migration crash that prevented changing a nullable field with a
default to non-nullable with the same default (<a class="reference external" href="https://code.djangoproject.com/ticket/23738">#23738</a>).</li>
<li>Fixed a migration crash when adding <code class="docutils literal notranslate"><span class="pre">GeometryField</span></code>s with <code class="docutils literal notranslate"><span class="pre">blank=True</span></code>
on PostGIS (<a class="reference external" href="https://code.djangoproject.com/ticket/23731">#23731</a>).</li>
<li>Allowed usage of <code class="docutils literal notranslate"><span class="pre">DateTimeField()</span></code> as <code class="docutils literal notranslate"><span class="pre">Transform.output_field</span></code>
(<a class="reference external" href="https://code.djangoproject.com/ticket/23420">#23420</a>).</li>
<li>Fixed a migration serializing bug involving <code class="docutils literal notranslate"><span class="pre">float(&quot;nan&quot;)</span></code> and
<code class="docutils literal notranslate"><span class="pre">float(&quot;inf&quot;)</span></code> (<a class="reference external" href="https://code.djangoproject.com/ticket/23770">#23770</a>).</li>
<li>Fixed a regression where custom form fields having a <code class="docutils literal notranslate"><span class="pre">queryset</span></code> attribute
but no <code class="docutils literal notranslate"><span class="pre">limit_choices_to</span></code> could not be used in a
<a class="reference internal" href="../topics/forms/modelforms.html#django.forms.ModelForm" title="django.forms.ModelForm"><code class="xref py py-class docutils literal notranslate"><span class="pre">ModelForm</span></code></a> (<a class="reference external" href="https://code.djangoproject.com/ticket/23795">#23795</a>).</li>
<li>Fixed a custom field type validation error with MySQL backend when
<code class="docutils literal notranslate"><span class="pre">db_type</span></code> returned <code class="docutils literal notranslate"><span class="pre">None</span></code> (<a class="reference external" href="https://code.djangoproject.com/ticket/23761">#23761</a>).</li>
<li>Fixed a migration crash when a field is renamed that is part of an
<code class="docutils literal notranslate"><span class="pre">index_together</span></code> (<a class="reference external" href="https://code.djangoproject.com/ticket/23859">#23859</a>).</li>
<li>Fixed <a class="reference internal" href="../ref/django-admin.html#django-admin-squashmigrations"><code class="xref std std-djadmin docutils literal notranslate"><span class="pre">squashmigrations</span></code></a> to respect the <code class="docutils literal notranslate"><span class="pre">--no-optimize</span></code> parameter
(<a class="reference external" href="https://code.djangoproject.com/ticket/23799">#23799</a>).</li>
<li>Made <a class="reference internal" href="../ref/migration-operations.html#django.db.migrations.operations.RenameModel" title="django.db.migrations.operations.RenameModel"><code class="xref py py-class docutils literal notranslate"><span class="pre">RenameModel</span></code></a> reversible
(<a class="reference external" href="https://code.djangoproject.com/ticket/22248">#22248</a>)</li>
<li>Avoided unnecessary rollbacks of migrations from other apps when migrating
backwards (<a class="reference external" href="https://code.djangoproject.com/ticket/23410">#23410</a>).</li>
<li>Fixed a rare query error when using deeply nested subqueries
(<a class="reference external" href="https://code.djangoproject.com/ticket/23605">#23605</a>).</li>
<li>Fixed a crash in migrations when deleting a field that is part of a
<code class="docutils literal notranslate"><span class="pre">index/unique_together</span></code> constraint (<a class="reference external" href="https://code.djangoproject.com/ticket/23794">#23794</a>).</li>
<li>Fixed <code class="docutils literal notranslate"><span class="pre">django.core.files.File.__repr__()</span></code> when the file’s <code class="docutils literal notranslate"><span class="pre">name</span></code> contains
Unicode characters (<a class="reference external" href="https://code.djangoproject.com/ticket/23888">#23888</a>).</li>
<li>Added missing context to the admin’s <code class="docutils literal notranslate"><span class="pre">delete_selected</span></code> view that prevented
custom site header, etc. from appearing (<a class="reference external" href="https://code.djangoproject.com/ticket/23898">#23898</a>).</li>
<li>Fixed a regression with dynamically generated inlines and allowed field
references in the admin (<a class="reference external" href="https://code.djangoproject.com/ticket/23754">#23754</a>).</li>
<li>Fixed an infinite loop bug for certain cyclic migration dependencies, and made
the error message for cyclic dependencies much more helpful.</li>
<li>Added missing <code class="docutils literal notranslate"><span class="pre">index_together</span></code> handling for SQLite (<a class="reference external" href="https://code.djangoproject.com/ticket/23880">#23880</a>).</li>
<li>Fixed a crash when <code class="docutils literal notranslate"><span class="pre">RunSQL</span></code> SQL content was collected by the schema editor,
typically when using <code class="docutils literal notranslate"><span class="pre">sqlmigrate</span></code> (<a class="reference external" href="https://code.djangoproject.com/ticket/23909">#23909</a>).</li>
<li>Fixed a regression in <code class="docutils literal notranslate"><span class="pre">contrib.admin</span></code> add/change views which caused some
<code class="docutils literal notranslate"><span class="pre">ModelAdmin</span></code> methods to receive the incorrect <code class="docutils literal notranslate"><span class="pre">obj</span></code> value
(<a class="reference external" href="https://code.djangoproject.com/ticket/23934">#23934</a>).</li>
<li>Fixed <code class="docutils literal notranslate"><span class="pre">runserver</span></code> crash when socket error message contained Unicode
characters (<a class="reference external" href="https://code.djangoproject.com/ticket/23946">#23946</a>).</li>
<li>Fixed serialization of <code class="docutils literal notranslate"><span class="pre">type</span></code> when adding a <code class="docutils literal notranslate"><span class="pre">deconstruct()</span></code> method
(<a class="reference external" href="https://code.djangoproject.com/ticket/23950">#23950</a>).</li>
<li>Prevented the
<code class="docutils literal notranslate"><span class="pre">django.contrib.auth.middleware.SessionAuthenticationMiddleware</span></code> from
setting a <code class="docutils literal notranslate"><span class="pre">&quot;Vary:</span> <span class="pre">Cookie&quot;</span></code> header on all responses (<a class="reference external" href="https://code.djangoproject.com/ticket/23939">#23939</a>).</li>
<li>Fixed a crash when adding <code class="docutils literal notranslate"><span class="pre">blank=True</span></code> to <code class="docutils literal notranslate"><span class="pre">TextField()</span></code> on MySQL
(<a class="reference external" href="https://code.djangoproject.com/ticket/23920">#23920</a>).</li>
<li>Fixed index creation by the migration infrastructure, particularly when
dealing with PostgreSQL specific <code class="docutils literal notranslate"><span class="pre">{text|varchar}_pattern_ops</span></code> indexes
(<a class="reference external" href="https://code.djangoproject.com/ticket/23954">#23954</a>).</li>
<li>Fixed bug in <code class="docutils literal notranslate"><span class="pre">makemigrations</span></code> that created broken migration files when
dealing with multiple table inheritance and inheriting from more than one
model (<a class="reference external" href="https://code.djangoproject.com/ticket/23956">#23956</a>).</li>
<li>Fixed a crash when a <code class="docutils literal notranslate"><span class="pre">MultiValueField</span></code> has invalid data (<a class="reference external" href="https://code.djangoproject.com/ticket/23674">#23674</a>).</li>
<li>Fixed a crash in the admin when using “Save as new” and also deleting a
related inline (<a class="reference external" href="https://code.djangoproject.com/ticket/23857">#23857</a>).</li>
<li>Always converted <code class="docutils literal notranslate"><span class="pre">related_name</span></code> to text (unicode), since that is required
on Python 3 for interpolation. Removed conversion of <code class="docutils literal notranslate"><span class="pre">related_name</span></code> to text
in migration deconstruction (<a class="reference external" href="https://code.djangoproject.com/ticket/23455">#23455</a> and <a class="reference external" href="https://code.djangoproject.com/ticket/23982">#23982</a>).</li>
<li>Enlarged the sizes of tablespaces which are created by default for testing
on Oracle (the main tablespace was increased from 200M to 300M and the
temporary tablespace from 100M to 150M). This was required to accommodate
growth in Django’s own test suite (<a class="reference external" href="https://code.djangoproject.com/ticket/23969">#23969</a>).</li>
<li>Fixed <code class="docutils literal notranslate"><span class="pre">timesince</span></code> filter translations in Korean (<a class="reference external" href="https://code.djangoproject.com/ticket/23989">#23989</a>).</li>
<li>Fixed the SQLite <code class="docutils literal notranslate"><span class="pre">SchemaEditor</span></code> to properly add defaults in the absence of
a user specified <code class="docutils literal notranslate"><span class="pre">default</span></code>. For example, a <code class="docutils literal notranslate"><span class="pre">CharField</span></code> with <code class="docutils literal notranslate"><span class="pre">blank=True</span></code>
didn’t set existing rows to an empty string which resulted in a crash when
adding the <code class="docutils literal notranslate"><span class="pre">NOT</span> <span class="pre">NULL</span></code> constraint (<a class="reference external" href="https://code.djangoproject.com/ticket/23987">#23987</a>).</li>
<li><code class="docutils literal notranslate"><span class="pre">makemigrations</span></code> no longer prompts for a default value when adding
<code class="docutils literal notranslate"><span class="pre">TextField()</span></code> or <code class="docutils literal notranslate"><span class="pre">CharField()</span></code> without a <code class="docutils literal notranslate"><span class="pre">default</span></code> (<a class="reference external" href="https://code.djangoproject.com/ticket/23405">#23405</a>).</li>
<li>Fixed a migration crash when adding <code class="docutils literal notranslate"><span class="pre">order_with_respect_to</span></code> to a table
with existing rows (<a class="reference external" href="https://code.djangoproject.com/ticket/23983">#23983</a>).</li>
<li>Restored the <code class="docutils literal notranslate"><span class="pre">pre_migrate</span></code> signal if all apps have migrations
(<a class="reference external" href="https://code.djangoproject.com/ticket/23975">#23975</a>).</li>
<li>Made admin system checks run for custom <code class="docutils literal notranslate"><span class="pre">AdminSite</span></code>s (<a class="reference external" href="https://code.djangoproject.com/ticket/23497">#23497</a>).</li>
<li>Ensured the app registry is fully populated when unpickling models. When an
external script (like a queueing infrastructure) reloads pickled models, it
could crash with an <code class="docutils literal notranslate"><span class="pre">AppRegistryNotReady</span></code> exception (<a class="reference external" href="https://code.djangoproject.com/ticket/24007">#24007</a>).</li>
<li>Added quoting to field indexes in the SQL generated by migrations to prevent
a crash when the index name requires it (<a class="reference external" href="https://code.djangoproject.com/ticket/24015">#24015</a>).</li>
<li>Added <code class="docutils literal notranslate"><span class="pre">datetime.time</span></code> support to migrations questioner (<a class="reference external" href="https://code.djangoproject.com/ticket/23998">#23998</a>).</li>
<li>Fixed admindocs crash on apps installed as eggs (<a class="reference external" href="https://code.djangoproject.com/ticket/23525">#23525</a>).</li>
<li>Changed migrations autodetector to generate an <code class="docutils literal notranslate"><span class="pre">AlterModelOptions</span></code> operation
instead of <code class="docutils literal notranslate"><span class="pre">DeleteModel</span></code> and <code class="docutils literal notranslate"><span class="pre">CreateModel</span></code> operations when changing
<code class="docutils literal notranslate"><span class="pre">Meta.managed</span></code>. This prevents data loss when changing <code class="docutils literal notranslate"><span class="pre">managed</span></code> from
<code class="docutils literal notranslate"><span class="pre">False</span></code> to <code class="docutils literal notranslate"><span class="pre">True</span></code> and vice versa (<a class="reference external" href="https://code.djangoproject.com/ticket/24037">#24037</a>).</li>
<li>Enabled the <code class="docutils literal notranslate"><span class="pre">sqlsequencereset</span></code> command on apps with migrations
(<a class="reference external" href="https://code.djangoproject.com/ticket/24054">#24054</a>).</li>
<li>Added tablespace SQL to apps with migrations (<a class="reference external" href="https://code.djangoproject.com/ticket/24051">#24051</a>).</li>
<li>Corrected <code class="docutils literal notranslate"><span class="pre">contrib.sites</span></code> default site creation in a multiple database
setup (<a class="reference external" href="https://code.djangoproject.com/ticket/24000">#24000</a>).</li>
<li>Restored support for objects that aren’t <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">str</span></code></a> or <a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#bytes" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">bytes</span></code></a> in
<code class="docutils literal notranslate"><span class="pre">django.utils.safestring.mark_for_escaping()</span></code> on Python 3.</li>
<li>Supported strings escaped by third-party libraries with the <code class="docutils literal notranslate"><span class="pre">__html__</span></code>
convention in the template engine (<a class="reference external" href="https://code.djangoproject.com/ticket/23831">#23831</a>).</li>
<li>Prevented extraneous <code class="docutils literal notranslate"><span class="pre">DROP</span> <span class="pre">DEFAULT</span></code> SQL in migrations (<a class="reference external" href="https://code.djangoproject.com/ticket/23581">#23581</a>).</li>
<li>Restored the ability to use more than five levels of subqueries
(<a class="reference external" href="https://code.djangoproject.com/ticket/23758">#23758</a>).</li>
<li>Fixed crash when <code class="docutils literal notranslate"><span class="pre">ValidationError</span></code> is initialized with a <code class="docutils literal notranslate"><span class="pre">ValidationError</span></code>
that is initialized with a dictionary (<a class="reference external" href="https://code.djangoproject.com/ticket/24008">#24008</a>).</li>
<li>Prevented a crash on apps without migrations when running <code class="docutils literal notranslate"><span class="pre">migrate</span> <span class="pre">--list</span></code>
(<a class="reference external" href="https://code.djangoproject.com/ticket/23366">#23366</a>).</li>
</ul>
</div>
</div>


          </div>
        </div>
      </div>
      
        
          <div class="yui-b" id="sidebar">
            
      <div class="sphinxsidebar" role="navigation" aria-label="main navigation">
        <div class="sphinxsidebarwrapper">
  <h3><a href="../contents.html">Table of Contents</a></h3>
  <ul>
<li><a class="reference internal" href="#">Django 1.7.2 release notes</a><ul>
<li><a class="reference internal" href="#bugfixes">Bugfixes</a></li>
</ul>
</li>
</ul>

  <h4>Previous topic</h4>
  <p class="topless"><a href="1.7.3.html"
                        title="previous chapter">Django 1.7.3 release notes</a></p>
  <h4>Next topic</h4>
  <p class="topless"><a href="1.7.1.html"
                        title="next chapter">Django 1.7.1 release notes</a></p>
  <div role="note" aria-label="source link">
    <h3>This Page</h3>
    <ul class="this-page-menu">
      <li><a href="../_sources/releases/1.7.2.txt"
            rel="nofollow">Show Source</a></li>
    </ul>
   </div>
<div id="searchbox" style="display: none" role="search">
  <h3>Quick search</h3>
    <div class="searchformwrapper">
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" />
      <input type="submit" value="Go" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
        </div>
      </div>
              <h3>Last update:</h3>
              <p class="topless">Mar 04, 2020</p>
          </div>
        
      
    </div>

    <div id="ft">
      <div class="nav">
    &laquo; <a href="1.7.3.html" title="Django 1.7.3 release notes">previous</a>
     |
    <a href="index.html" title="Release notes" accesskey="U">up</a>
   |
    <a href="1.7.1.html" title="Django 1.7.1 release notes">next</a> &raquo;</div>
    </div>
  </div>

      <div class="clearer"></div>
    </div>
  </body>
</html>